<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
		<meta name="viewport" content=" width=device-width initial-scale=1.0 maximum-scale=1 minimum-scale=1 user-scalable=no viewport-fit=cover">
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			#demo{
				width: 100%;
				height: 300px;
				background-color: skyblue;
				font-size: 40px;
			}
		</style>
	</head>
	<body>
		<div id="demo"></div>
		<script type="text/javascript" >
			const demo = document.getElementById('demo')
			let d

			demo.addEventListener('touchstart',()=>{
				console.log('你触摸元素了')
				d = Date.now()
			})

			demo.addEventListener('click',()=>{
				document.getElementById('demo').innerHTML = Date.now()-d
				console.log('你点击元素了',Date.now()-d)
			})

			
			
			
		</script>
	</body>
</html>